package com.qqtech.qquan.circle.service;

import com.qqtech.core.common.exception.BizzException;
import com.qqtech.core.frame.service.BaseService;
import com.qqtech.qquan.circle.model.CircleApply;

public interface CircleApplyService extends BaseService<CircleApply> {
	
	/**
	 * 是否已经提交过了申请
	 * @param applyerId
	 * @param circleOwnerId
	 * @param circleId
	 * @return
	 */
	public boolean isCircleApplyExist(Integer applyerId,Integer circleOwnerId, Integer circleId);
	
	/**
	 * 同意申请
	 * @param circleApply
	 * @return
	 * @throws BizzException
	 */
	public int acceptApply(CircleApply circleApply) throws BizzException;
	/**
	 *  忽略申请
	 * @param circleApply
	 * @return
	 * @throws BizzException
	 */
	public int ignoreApply(CircleApply circleApply) throws BizzException;
	
	/**
	 * 申请加入圈子
	 * @param applyerId 
	 * 			申请人id
	 * @param circleId
	 * 			圈子id
	 * @return
	 * @throws BizzException
	 */
	public int apply2JoinCircle(Integer applyerId, Integer circleId) throws BizzException;
	/**
	 * 删除申请
	 * @param circleApply
	 * @return
	 * @throws BizzException
	 */
	public int removeApply(CircleApply circleApply) throws BizzException;
	
}